Write a custom CUDA kernel to optimize `NISRLU` (Normalized Inverse Square Root Linear Unit).

Formula:
  f(x) = x * (1 / sqrt(alpha))             if x >= 0
  f(x) = x * (1 / sqrt(1 + alpha * x^2))   if x < 0

Problem Analysis:
1. Memory Bound: This is a point-wise activation function, so its performance is limited by memory bandwidth.
2. Operator Chaining: The PyTorch implementation involves masking, sqrt/rsqrt, multiplication, and scaling, leading to multiple kernel launches and redundant global memory traffic.

Optimization Strategy: Fused Element-wise Kernel with Vectorization

1. One-Thread-per-Element: Map each element to a CUDA thread.

2. Vectorized Loads (float4): Use `float4` to process 128 bits per thread to maximize memory throughput.

3. Fused Branching Logic:
   - Pre-compute `scale = 1.0f / sqrtf(alpha)` on the host and pass to kernel.
   - Kernel logic: `val = (x < 0) ? x * rsqrtf(1.0f + alpha * x * x) : x * scale;`
   - Use `rsqrtf` for fast inverse square root.

4. One-Pass: Fuse all steps into a single read-compute-write kernel.
  
Here's an example to show you the syntax of inline embedding custom CUDA operators in torch: The example given architecture is:   
  
```python
import torch
import torch.nn as nn
import math

BATCH_SIZE = 4096
HIDDEN_DIM = 4096
SHAPE = (BATCH_SIZE, HIDDEN_DIM)

ALPHA_VALUE = 1.0

class NISRLU(nn.Module):
    """
     "ISRLU AND NISRLU: A NOVEL ACTIVATION FUNCTION AND A NOVEL INITIALIZER" (arXiv, 2017)
    Formula:
      f(x) = x * (1 / sqrt(alpha))             if x >= 0
      f(x) = x * (1 / sqrt(1 + alpha * x^2))   if x < 0
    """
    def __init__(self, alpha=1.0):
        super(NISRLU, self).__init__()
        self.alpha = alpha
        # 预计算 scale
        self.scale = 1.0 / math.sqrt(alpha)

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        neg_part = x / torch.sqrt(1.0 + self.alpha * torch.pow(x, 2))
        pos_part = x * self.scale
        return torch.where(x < 0, neg_part, pos_part)

class Model(nn.Module):
    def __init__(self, alpha=1.0):
        super(Model, self).__init__()
        self.act = NISRLU(alpha)
    
    def forward(self, x):
        return self.act(x)

def get_inputs():
    input_tensor = torch.randn(SHAPE, dtype=torch.float32) * 5.0
    return [input_tensor.contiguous()]

def get_init_inputs():
    return [ALPHA_VALUE]